Skip to content

Fix TLS not enabling for dynamic fastly backends#35

Open
ChristianPavilonis wants to merge 4 commits intomainfrom
fix/fastly-backend-tls-issue
Open

Fix TLS not enabling for dynamic fastly backends#35
ChristianPavilonis wants to merge 4 commits intomainfrom
fix/fastly-backend-tls-issue

Conversation

@ChristianPavilonis
Copy link
Contributor

@ChristianPavilonis ChristianPavilonis commented Jan 30, 2026

closes #42

Fix TLS and improve robustness of dynamic Fastly backends
Changes:

  • Default port handling — Defaults to port 443 for HTTPS, 80 for HTTP when not specified. Backend target is always host:port.
  • Full TLS configuration — Adds sni_hostname() and check_certificate() alongside enable_ssl() for proper certificate validation.
  • Timeouts — Adds connect_timeout(1s), first_byte_timeout(15s), between_bytes_timeout(10s).
  • Explicit NameInUse handling — Instead of a fragile retry, checks error message for "NameInUse"/"already in use" and reuses the existing backend. All other errors are properly propagated.
  • Human-readable backend names — Changed from hash-based (edgezero-dynamic-{hash}) to readable (edgezero-dynamic-https_example_com_443).
  • Case-insensitive scheme check — Uses eq_ignore_ascii_case("https") instead of exact match.
  • Debug logging — Logs backend creation, SSL enablement, and reuse at debug level.
  • Simpler return type — Returns Result<String, EdgeError> (backend name) instead of Result<Backend, _> since the caller only needs the name.

@ChristianPavilonis ChristianPavilonis force-pushed the fix/fastly-backend-tls-issue branch from 239d5c1 to db6f1e4 Compare February 5, 2026 20:52
@aram356 aram356 requested a review from prk-Jr February 5, 2026 20:56
Copy link
Contributor

@aram356 aram356 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TLS not enabling for dynamic fastly backends

3 participants